package com.ruoyi.project.beautyflower.loanApplication.mapper;

import com.ruoyi.project.beautyflower.loanApplication.domain.LoanApplication;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户借款申请 数据层
 * 
 * @author lxs
 * @date 2018-10-13
 */
public interface LoanApplicationMapper 
{
	/**
     * 查询用户借款申请信息
     * 
     * @param id 用户借款申请ID
     * @return 用户借款申请信息
     */
	public LoanApplication selectLoanApplicationById(Integer id);
	
	/**
     * 查询用户借款申请列表
     * 
     * @param loanApplication 用户借款申请信息
     * @return 用户借款申请集合
     */
	public List<LoanApplication> selectLoanApplicationList(LoanApplication loanApplication);
	
	/**
     * 新增用户借款申请
     * 
     * @param loanApplication 用户借款申请信息
     * @return 结果
     */
	public int insertLoanApplication(LoanApplication loanApplication);
	
	/**
     * 修改用户借款申请
     * 
     * @param loanApplication 用户借款申请信息
     * @return 结果
     */
	public int updateLoanApplication(LoanApplication loanApplication);
	
	/**
     * 删除用户借款申请
     * 
     * @param id 用户借款申请ID
     * @return 结果
     */
	public int deleteLoanApplicationById(Integer id);
	
	/**
     * 批量删除用户借款申请
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteLoanApplicationByIds(String[] ids);


	/**
	 * 根据用户id查询最近一次的借款申请记录
	 * @param userId
	 * @return
	 */
	List<LoanApplication> selectLoanApplicationByUsetId(@Param("userId") Integer userId);
	
}